{extends file="assets::smarty-templates::Master"|ToPath}
{block name=content}

{html_css file="whiteLabel/light/jquery.datatables.css"}
{html_script src="WhiteLabel.datatables.js"}

<div id="sombreadoAcademico">
    <ul>
        <li><a href="#Todas">Todas</a></li>
        <li><a href="#Pendientes">Pendientes</a></li>
        <li><a href="#Aprobadas">Aprobadas</a></li>
    </ul>

    {*Todas*}
    <div id="Todas">
        <table class="datatable tablesorter-semaforo" >
            <thead>
            <th class="header">Codigo</th>
            <th class="header">Nombre</th>
            <th class="header">Semestre</th>
            <th class="header">Creaditos</th>
            </thead>
            {foreach $Todas as $Pensum}
            <tr>
                <td>{$Pensum->getMateria()->getCodigoMateria()}</td>
                <td>{$Pensum->getMateria()->getNombreMateria()}</td>
                <td>{$Pensum->getNumeroSemestre()}</td>
                <td>{$Pensum->getNumeroCreditos()}</td>
            </tr>
            {/foreach}
        </table>
    </div>

    {*Pendientes*}
    <div id="Pendientes">
        <table class="datatable tablesorter-semaforo" >
            <thead>
            <th class="header">Codigo</th>
            <th class="header">Nombre</th>
            <th class="header">Semestre</th>
            <th class="header">Creaditos</th>
            </thead>
            {foreach $Pendientes as $Pensum}
            <tr>
                <td>{$Pensum->getMateria()->getCodigoMateria()}</td>
                <td>{$Pensum->getMateria()->getNombreMateria()}</td>
                <td>{$Pensum->getNumeroSemestre()}</td>
                <td>{$Pensum->getNumeroCreditos()}</td>
            </tr>
            {/foreach}
        </table>
    </div>

    {*Aprobadas*}
    <div id="Aprobadas">
        <table class="datatable tablesorter-semaforo" >
            <thead>
            <th class="header">Codigo</th>
            <th class="header">Nombre</th>
            <th class="header">Cursada</th>
            <th class="header">Nota</th>
            </thead>
            {foreach $Aprovadas as $Curso}
            <tr>
                <td>{$Curso->getCurso()->getMateria()->getCodigoMateria()}</td>
                <td>{$Curso->getCurso()->getMateria()->getNombreMateria()}</td>
                <td>{$Curso->getCurso()->getCursoPk()->getPerdiodoAcademico()->getAno()} - {$Curso->getCurso()->getCursoPk()->getPerdiodoAcademico()->getPeriodo()}</td>
                <td>{$Curso->getNotaDefinitiva()|string_format:"%.1f"}</td>
            </tr>
            {/foreach}
        </table>
    </div>
</div>
<script type="text/javascript" >
    jQuery.noConflict();
    {literal}
    jQuery(document).ready(function($){
        $("table.datatable").dataTable({});
    });
    {/literal}
</script>
{/block}